<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>微信公众号列表 - [[${configs.title}]]</title>
    <link rel="stylesheet" href="/statics/layui-v2.8.15/css/layui.css">
    <link rel="stylesheet" href="/statics/css/admin/common.css">
</head>
<body>
<!-- 内容主体区域 -->
<div class="main-body">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>微信公众号列表</legend>
    </fieldset>
    <table class="layui-table">
        <thead>
        <tr>
            <th>部门名称</th>
            <th>公众号名称</th>
            <th>公众号原始ID</th>
            <th>公众号AppId</th>
            <th>添加时间</th>
            <th>管理</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="entries,stat:${pageData.records}">
            <td th:text="${entries['department']}"></td>
            <td th:text="${entries['name']}"></td>
            <td th:text="${entries['mpId']}"></td>
            <td th:text="${entries['appId']}"></td>
            <td th:text="${entries['formatCreatedTime']}"></td>
            <td>
                <div id="operate">
                    <a href="javascript:;" class="layui-btn layui-btn-xs" data-method="edit" lay-event="edit"
                       th:data-id="${entries['id']}"><i class="layui-icon">&#xe642;</i></a>
                    <a href="javascript:;" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"
                       data-method="delete" th:data-id="${entries['id']}" th:data-name="${entries['name']}"><i
                            class="layui-icon">&#xe640;</i></a>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="layui-row">
        <div id="page" align="right"></div>
    </div>
</div>
<script src="/statics/layui-v2.8.15/layui.js"></script>
<script type="text/javascript">
    let module = "wechat", moduleName= "微信公众号", total = [[${pageData.total}]] ,
        page = [[${pageData.current}]], limit = [[${pageData.size}]];
        layui.use(['laypage'], function () {
        let laypage = layui.laypage;
        laypage.render({
            elem: 'page'
            , count: total
            , limit: limit
            , curr: page
            , layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            , jump: function (obj) {
                if (obj.curr !== page || obj.limit !== limit) {
                    location.href =  '/admin/wechat?page=' + obj.curr + '&size=' + obj.limit;
                }
            }
        });
    });
</script>
<script src="/statics/js/common.js"></script>
</body>
</html>